<%@ page language="java" import="java.util.*" contentType="text/html; charset=gb2312"
    pageEncoding="gb2312"%>
 <%@page import="java.sql.*" %>
 <%
    Connection conn=null;
    try{
    	Object a=Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    	String user="etl";
    	String password="etl";
    	String url="jdbc:oracle:thin://localhost:1521:ORCL";
    	conn=DriverManager.getConnection(url,user,password);
    }catch(SQLException e){
    	e.printStackTrace();
    }
    try{
    String sql="select * from etl.comfort";
    Statement stmt=conn.createStatement();
    ResultSet rs=stmt.executeQuery(sql);
    int i=1;
    out.println("<table border='1'>");
    while(rs.next()){
    	
    out.println("<tr><td>"+rs.getInt(3)+"</td>"+"<td>"+rs.getString(2)+"</td><td>"+rs.getString(3)+"</td><td>"+rs.getString(4)+"</td></tr>");
    i++;
    }
    out.println("</table>");
    } catch(Exception e)
	   { 
		   System.out.println(e.getMessage());

	   }    
 %>
